<?php

/**
 * Trade form.
 *
 * @package    truetrader
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class TradeForm extends BaseTradeForm
{
  public function configure()
  {
    $this->widgetSchema->getFormFormatter()->setTranslationCatalogue('form');
    
    unset(
            $this['created_at'], $this['updated_at'], $this['token']
    );

    $this->widgetSchema['trader_id'] = new sfWidgetFormInputHidden(array());
    $this->widgetSchema['published_at'] = new sfWidgetFormInputHidden(array());


    $this->widgetSchema['trade'] = new sfWidgetFormChoice(array(
                'choices' => Doctrine_Core::getTable('Trade')->getTradeTypes(),
                'expanded' => true,
            ));

    $range = range(1, 50);
    $this->widgetSchema['contract_number'] = new sfWidgetFormChoice(array(
        'choices' => $range
    ));

  }
}
